// ActionScript file

//imports
import mx.logging.ILogger;
import mx.logging.LogEventLevel;
import mx.logging.Log;
import mx.controls.Alert;
//import mx.utils.Delegate;


import mx.events.CloseEvent;
import mx.events.ListEvent;

import flash.display.Stage;
import flash.display.NativeWindow;
import flash.net.SharedObject;

import mx.collections.ArrayCollection;
import mx.rpc.http.HTTPService;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;

import air.net.URLMonitor;

import com.adobe.serialization.json.JSON;


import com.ninearrows.db.DatabaseGenerator;
import com.ninearrows.db.Projects;

import com.ninearrows.extend.DataGridColumnItemRendererCheckBox

import mx.managers.PopUpManager;
import mx.core.IFlexDisplayObject;
import mx.containers.TitleWindow;

import com.ninearrows.containers.DialogEditTask;
import com.ninearrows.containers.DialogEditMilestone;
import com.ninearrows.containers.DialogEditEvent;
import com.ninearrows.containers.WbsSyncProgress;
import com.ninearrows.containers.DialogSelectUser;

import com.hurlant.util.Hex;
import com.hurlant.crypto.Crypto;
import com.hurlant.crypto.symmetric.*;
import com.hurlant.crypto.hash.*;


[Bindable]

private static var _myLogger:ILogger = Log.getLogger("9ArrowsWBS");

public var _loginId:int;

private var _default_server:String = 'http://9arrows.com/login/';
private var _serverUrl:String      = '';

private var _service:HTTPService
private var _monitor:URLMonitor

private var _shared_object_name:String = '9arrowsWBS';
private var _localSo:SharedObject;// = SharedObject.getLocal("9arrowsWBS");
public var _databaseFile:File = File.applicationStorageDirectory.resolvePath("9arrows.db");

private var _generator:DatabaseGenerator = new DatabaseGenerator();

public var _cur_project:Object;

private var wbs_list = null;

private var _wbs_progress_bar:WbsSyncProgress;

// Error
private static const ERROR_INTERNAL_SERVER_ERROR:String = "サーバでエラーが発生しました。"
private static const MESSAGE_RETURN_LOGIN:String        = "ログインに戻ります。"
private static const MESSAGE_APPLICATION_EXIT:String    = "アプリケーションを終了します。"
